import React, { Component } from 'react';

class Two_two extends Component {
  state = {
    name: '',
  }


  changeName =(e)=>{
    this.setState({
      name: e.target.value
    })
  }
  add = ()=>{
    console.log(this.state.name)
  }

  render() {
    return (
      <div>
        <input onChange={this.changeName} value={this.state.name} type="text"></input>
        <button onClick={this.add}>保存</button>
        <div>动态修改路由配置项name没想通咋弄，希望能够解答一下</div>
      </div>
    );
  }
}

export default Two_two;
